package com.qf.vue2.service;

import com.qf.vue2.mapper.UserMapper;
import com.qf.vue2.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {

    @Autowired
    private UserMapper userMapper;

    /**
     * 登录业务
     * @param user
     * @return
     */
    public User login(User user){
        //调用mapper完成用户查询

        return userMapper.findByUsernameAndPassword(user.getUsername(),user.getPassword());
    }
}
